package com.bonc.apim.dao;

import com.bonc.apim.entity.Publish;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 发布审核查询
 *
 * @author wjx
 */
@Transactional
public interface PublishDao extends JpaRepository<Publish, Long> {

    public List<Publish> findByProviderNameAndApiNameAndVersionAndContextAndTierAndProtocolAndApiApproveStatusIn(String providerName, String apiName, String version, String context, String tier, String protocol, int[] apiApproveStatus);

    public Publish findByProInsId(String flowInstId);

    public Publish findById(Long id);

    public Publish findByProviderNameAndApiNameAndVersion(String providerName, String apiName, String version);
}
